import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Child from '../components/child1'
import Parent1 from '../pages/parent1'

Vue.use(Router)

export default new Router({
	mode: 'history',
	routes: [
	    {
			path: '/',
			name: 'Hello',
			component: HelloWorld
	    },
	    {
			path: '*', //防止找不到页面
			component: HelloWorld
		},
	    {
			path: '/child',
			component: Child
		},
		{
			path: '/parent1',
			component: Parent1
		}
  	]
})
